# strs =input('请输入一个字符串')
# str_len = len(strs)
# str_max = max(strs)
# str_min = min(strs)
# print('该字符串中最大字符为：',str_max)
# print('该字符串中最小字符为：',str_min)
# print('+'+'-'*str_len+'+')
# print('|'+strs+"|")
# print('+'+'-'*str_len+'+
# str2 = 'abcdefg'
# str3 = str2[1:]
# print(str3)
excerpts='123456789'
name = input('请输入一到九的数字')
if name in excerpts:
    index =excerpts.index(name)
    print(name,'首次出现的地方索引为：',index)
    print(name,'在此片段出现',excerpts.count(name),'次')
else:
    print(name,'没有出现在此片段中')